#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int signFunc(int num)
{
    if (num == 0)
        return 0;
    else if (num > 0)
        return 1;
    else
        return -1;
}

int arraySign(int* nums, int numsSize)
{
    int product = 1;

    for (int i = 0; i < numsSize; i++)
    {
        int k = 1;
        if (nums[i] == 0)
            k = 0;
        else if (nums[i] < 0)
            k = -1;
        else
            k = 1;
        product = product * k;
    }
    return signFunc(product);
}

int main()
{
    int nums[5] = { 1,2,6,4,5 };
    int numsSize = 5;
    printf("%d",isMonotonic(nums, numsSize));
    return 0;
}

